package cn.iocoder.yudao.framework.common.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 排序字段 DTO
 * <p>
 * 类名加了 ing 的原因是，避免和 ES SortField 重名。
 */
@Data
@ApiModel("排序规则")
@NoArgsConstructor
@AllArgsConstructor
public class SortingField implements Serializable {

    public static final String ORDER_ASC = "asc";
    public static final String ORDER_DESC = "desc";
    public static final String ORDER_FIELD = "updateTime";

    @ApiModelProperty(value = "排序字段", example = "updateTime")
    private String field = ORDER_FIELD;

    @ApiModelProperty(value = "排序方式", example = "desc")
    private String order = ORDER_DESC;

}
